home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
program
/
swagd_f.zip
/
DOS.SWG
/
0066_File There ??.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1994-08-24
|
927b
|
22 lines
{ Try the DOS GetAttr function (Also faster than findfirst) }
{ test to see if file exists }
function fIsFileP(SrcPath:pchar):boolean;
inline({get fattr, dos 2.0+}
$5A/ { pop dx }
$58/ { pop ax }
$1E/ { push ds }
$8E/$D8/ { mov ds,ax }
$B8/$00/$43/ { MOV AX,4300h }
$CD/$21/ { int 21h }
$1F/ { pop ds }
$72/$08/ { JC +8 }
$B8/$01/$00/ { MOV AX,1 }
$F6/$C1/$10/ { TEST CL,faDirectory }
$74/$02/ { JE +2 }
$31/$C0); { xor ax,ax }
BEGIN
WriteLn(FisFIleP('\turbo\bp.exe'));
END.